<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/BSP/dev_io_spi.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_4ca18d753a70f6eada20fde478bd3fc8.html">BSP</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle"><div class="title">dev_io_spi.c 文件参考</div></div>
</div><!--header-->
<div class="contents">

<p>IO 模拟 SPI 通讯接口  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="dev__io__spi_8h_source.html">dev_io_spi.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="dev__io_8h_source.html">dev_io.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
dev_io_spi.c 的引用(Include)关系图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8c__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io__spi_8c" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io__spi_8c" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io__spi_8c">
<area shape="rect" title="IO 模拟 SPI 通讯接口" alt="" coords="5,5,228,75"/>
<area shape="rect" href="dev__io__spi_8h.html" title="IO 模拟 SPI 通讯接口" alt="" coords="18,123,111,148"/>
<area shape="rect" href="dev__io_8h.html" title="IO 模拟外设功能底层操作宏, 用于对接[外设驱动层], [用户层]应使用[驱动层]的接口, 不宜直接使用本模块" alt="" coords="135,123,205,148"/>
<area shape="rect" title=" " alt="" coords="32,196,97,221"/>
<area shape="rect" title=" " alt="" coords="127,196,213,221"/>
</map>
</div>
</div>
<p><a href="dev__io__spi_8c_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a29534de25cba8083364fe9806261b0d5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a29534de25cba8083364fe9806261b0d5">DATA_PORT_SERIAL_ENABLE</a></td></tr>
<tr class="memdesc:a29534de25cba8083364fe9806261b0d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">针对[硬件端口连续的特点]进行优化, 仅访问一次 GPIOx-&gt;IDR 寄存器, 若未定义该宏则转为普遍适用的依次读取四次 GPIOx-&gt;IDR 寄存器方式.  <a href="dev__io__spi_8c.html#a29534de25cba8083364fe9806261b0d5">更多...</a><br /></td></tr>
<tr class="separator:a29534de25cba8083364fe9806261b0d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3badb246f5467fa88e29a1805028c949"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a3badb246f5467fa88e29a1805028c949">SPI_CFREQ</a>&#160;&#160;&#160;(1000 * 1000 * 30)</td></tr>
<tr class="memdesc:a3badb246f5467fa88e29a1805028c949"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI 时钟频率 / HZ (1 data-line : 1 HZ == 1 bps) 上限取决于系统运行主频, 当然软件模拟的 SPI 通讯速率也受到硬件 IO 翻转速度与代码运行消耗时长的影响  <a href="dev__io__spi_8c.html#a3badb246f5467fa88e29a1805028c949">更多...</a><br /></td></tr>
<tr class="separator:a3badb246f5467fa88e29a1805028c949"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8e335b1f808bd7408d2aef2377adcb1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#ad8e335b1f808bd7408d2aef2377adcb1">SPI_CPOL</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:ad8e335b1f808bd7408d2aef2377adcb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI 时钟极性 : 0 = SCK State Idle-Low, Active-High 1 = SCK State Idle-High, Active-Low  <a href="dev__io__spi_8c.html#ad8e335b1f808bd7408d2aef2377adcb1">更多...</a><br /></td></tr>
<tr class="separator:ad8e335b1f808bd7408d2aef2377adcb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49e8927a636f45641d6231ac63b9e598"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a49e8927a636f45641d6231ac63b9e598">SPI_CPHA</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:a49e8927a636f45641d6231ac63b9e598"><td class="mdescLeft">&#160;</td><td class="mdescRight">SPI 时钟相位 : 数据位采样相对于时钟线的时序 0 = 在时钟信号 SCK 的第 1 个跳变沿采样 1 = 在时钟信号 SCK 的第 2 个跳变沿采样  <a href="dev__io__spi_8c.html#a49e8927a636f45641d6231ac63b9e598">更多...</a><br /></td></tr>
<tr class="separator:a49e8927a636f45641d6231ac63b9e598"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4460807041ec11a6df7a1e468fe6502"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#ac4460807041ec11a6df7a1e468fe6502">SPI_GPIO_CS</a>&#160;&#160;&#160;GPIOD</td></tr>
<tr class="separator:ac4460807041ec11a6df7a1e468fe6502"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32b432ca0c157114ad8724b4ccfd54eb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a32b432ca0c157114ad8724b4ccfd54eb">SPI_GPIO_SCLK</a>&#160;&#160;&#160;GPIOD</td></tr>
<tr class="separator:a32b432ca0c157114ad8724b4ccfd54eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11ca1473a91ebd7bf66109cfdbecd09c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a11ca1473a91ebd7bf66109cfdbecd09c">SPI_GPIO_MOSI</a>&#160;&#160;&#160;GPIOD</td></tr>
<tr class="separator:a11ca1473a91ebd7bf66109cfdbecd09c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96c89cf4d15222d7f17682e86539412a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a96c89cf4d15222d7f17682e86539412a">SPI_GPIO_MISO</a>&#160;&#160;&#160;GPIOD</td></tr>
<tr class="separator:a96c89cf4d15222d7f17682e86539412a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfc84d8189ab922c0fb612466346c54f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#abfc84d8189ab922c0fb612466346c54f">SPI_GPIO_DATA2</a>&#160;&#160;&#160;GPIOD</td></tr>
<tr class="separator:abfc84d8189ab922c0fb612466346c54f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab16748ae81bb0d5e74df6f6be62bfa4b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#ab16748ae81bb0d5e74df6f6be62bfa4b">SPI_GPIO_DATA3</a>&#160;&#160;&#160;GPIOD</td></tr>
<tr class="separator:ab16748ae81bb0d5e74df6f6be62bfa4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ac3f651965edaa13ae45f8ce3388190"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a1ac3f651965edaa13ae45f8ce3388190">SPI_PIN_CS</a>&#160;&#160;&#160;PIN6</td></tr>
<tr class="separator:a1ac3f651965edaa13ae45f8ce3388190"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad33a7f1c6464113d724bfb8512a7111a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#ad33a7f1c6464113d724bfb8512a7111a">SPI_PIN_SCLK</a>&#160;&#160;&#160;PIN5</td></tr>
<tr class="separator:ad33a7f1c6464113d724bfb8512a7111a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae92d87a045a62c81ba03225f826d0d66"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#ae92d87a045a62c81ba03225f826d0d66">SPI_PIN_MOSI</a>&#160;&#160;&#160;PIN8</td></tr>
<tr class="separator:ae92d87a045a62c81ba03225f826d0d66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c324b7fda3d7ab955ab2e1c14e9bba1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a8c324b7fda3d7ab955ab2e1c14e9bba1">SPI_PIN_MISO</a>&#160;&#160;&#160;PIN7</td></tr>
<tr class="separator:a8c324b7fda3d7ab955ab2e1c14e9bba1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae31c83f0ad20aa7ad6cec86418d365ab"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#ae31c83f0ad20aa7ad6cec86418d365ab">SPI_PIN_DATA2</a>&#160;&#160;&#160;PIN3</td></tr>
<tr class="separator:ae31c83f0ad20aa7ad6cec86418d365ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af370caa354a35a648239e4b92a17db85"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#af370caa354a35a648239e4b92a17db85">SPI_PIN_DATA3</a>&#160;&#160;&#160;PIN4</td></tr>
<tr class="separator:af370caa354a35a648239e4b92a17db85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48ba1c7927ff9208d9a478473553f849"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a48ba1c7927ff9208d9a478473553f849">SCLK_SET_IDLE</a>()&#160;&#160;&#160;<a class="el" href="dev__io_8h.html#a96b4afe19e3f086e8b63be4f58797a71">IO_SET_L</a>(<a class="el" href="dev__io__spi_8c.html#a32b432ca0c157114ad8724b4ccfd54eb">SPI_GPIO_SCLK</a>, <a class="el" href="dev__io__spi_8c.html#ad33a7f1c6464113d724bfb8512a7111a">SPI_PIN_SCLK</a>)</td></tr>
<tr class="separator:a48ba1c7927ff9208d9a478473553f849"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0769ce806ae0f2d344eb049dd659ddc1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a0769ce806ae0f2d344eb049dd659ddc1">SCLK_SET_BUSY</a>()&#160;&#160;&#160;<a class="el" href="dev__io_8h.html#a2b996c7f57f00197b2a21ec4e00265d0">IO_SET_H</a>(<a class="el" href="dev__io__spi_8c.html#a32b432ca0c157114ad8724b4ccfd54eb">SPI_GPIO_SCLK</a>, <a class="el" href="dev__io__spi_8c.html#ad33a7f1c6464113d724bfb8512a7111a">SPI_PIN_SCLK</a>)</td></tr>
<tr class="separator:a0769ce806ae0f2d344eb049dd659ddc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c4bb1c90ea96967cc17a94920be8215"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a2c4bb1c90ea96967cc17a94920be8215">SET_QSPI_READ</a>()</td></tr>
<tr class="separator:a2c4bb1c90ea96967cc17a94920be8215"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a327333db8ba4c488ba430739c8c4a03c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a327333db8ba4c488ba430739c8c4a03c">SET_QSPI_WRITE</a>()</td></tr>
<tr class="separator:a327333db8ba4c488ba430739c8c4a03c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a1ff4cee6a643c539fcad8e287445f95f"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a1ff4cee6a643c539fcad8e287445f95f">io_spi_delay</a> (void)</td></tr>
<tr class="memdesc:a1ff4cee6a643c539fcad8e287445f95f"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 SPI 通讯的时延  <a href="dev__io__spi_8c.html#a1ff4cee6a643c539fcad8e287445f95f">更多...</a><br /></td></tr>
<tr class="separator:a1ff4cee6a643c539fcad8e287445f95f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16d2dfe6a5c03f49b9584239472f5c41"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a16d2dfe6a5c03f49b9584239472f5c41">IO_SPI_CS_LOW</a> (void)</td></tr>
<tr class="memdesc:a16d2dfe6a5c03f49b9584239472f5c41"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 SPI 通讯的 CS 拉低  <a href="dev__io__spi_8c.html#a16d2dfe6a5c03f49b9584239472f5c41">更多...</a><br /></td></tr>
<tr class="separator:a16d2dfe6a5c03f49b9584239472f5c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97e76f9e7d5b3673003b3062b0982abb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a97e76f9e7d5b3673003b3062b0982abb">IO_SPI_CS_HIGH</a> (void)</td></tr>
<tr class="memdesc:a97e76f9e7d5b3673003b3062b0982abb"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 SPI 通讯的 CS 拉高  <a href="dev__io__spi_8c.html#a97e76f9e7d5b3673003b3062b0982abb">更多...</a><br /></td></tr>
<tr class="separator:a97e76f9e7d5b3673003b3062b0982abb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5dc9bbf8a794391f1183411c047dfa2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#ae5dc9bbf8a794391f1183411c047dfa2">io_spi_init</a> (void)</td></tr>
<tr class="memdesc:ae5dc9bbf8a794391f1183411c047dfa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 SPI 通讯端口初始化  <a href="dev__io__spi_8c.html#ae5dc9bbf8a794391f1183411c047dfa2">更多...</a><br /></td></tr>
<tr class="separator:ae5dc9bbf8a794391f1183411c047dfa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb59768338d754f15de5d09e175fb3b8"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#adb59768338d754f15de5d09e175fb3b8">io_spi_readwrite</a> (uint32_t data, uint32_t bit_len)</td></tr>
<tr class="memdesc:adb59768338d754f15de5d09e175fb3b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟标准 SPI 通讯读写  <a href="dev__io__spi_8c.html#adb59768338d754f15de5d09e175fb3b8">更多...</a><br /></td></tr>
<tr class="separator:adb59768338d754f15de5d09e175fb3b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbe161ab6562f9da568695c02f71d18e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#acbe161ab6562f9da568695c02f71d18e">io_qspi_write</a> (uint32_t data, uint32_t bit_len)</td></tr>
<tr class="memdesc:acbe161ab6562f9da568695c02f71d18e"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 QSPI 通讯写  <a href="dev__io__spi_8c.html#acbe161ab6562f9da568695c02f71d18e">更多...</a><br /></td></tr>
<tr class="separator:acbe161ab6562f9da568695c02f71d18e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b9736b990d7b5ce371509d7edd35a70"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io__spi_8c.html#a4b9736b990d7b5ce371509d7edd35a70">io_qspi_read</a> (uint32_t bit_len)</td></tr>
<tr class="memdesc:a4b9736b990d7b5ce371509d7edd35a70"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 模拟 QSPI 通讯读  <a href="dev__io__spi_8c.html#a4b9736b990d7b5ce371509d7edd35a70">更多...</a><br /></td></tr>
<tr class="separator:a4b9736b990d7b5ce371509d7edd35a70"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p >IO 模拟 SPI 通讯接口 </p>
<p >/ </p><dl class="section since"><dt>自从</dt><dd>Change Logs: Date Author Notes 2022-12-08 lzh the first version 2023-05-06 lzh add configuration options (CPOL / CPHA / SCK frequency) </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>/</dd></dl>
<dl class="section attention"><dt>注意</dt><dd></dd></dl>
<p>THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, SYNWIT SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONN- -ECTION WITH THEIR PRODUCTS.</p>
<dl class="section copyright"><dt>版权所有</dt><dd>2012 Synwit Technology </dd></dl>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 中定义.</p>
</div><h2 class="groupheader">宏定义说明</h2>
<a id="a29534de25cba8083364fe9806261b0d5" name="a29534de25cba8083364fe9806261b0d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29534de25cba8083364fe9806261b0d5">&#9670;&#160;</a></span>DATA_PORT_SERIAL_ENABLE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DATA_PORT_SERIAL_ENABLE</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>针对[硬件端口连续的特点]进行优化, 仅访问一次 GPIOx-&gt;IDR 寄存器, 若未定义该宏则转为普遍适用的依次读取四次 GPIOx-&gt;IDR 寄存器方式. </p>
<p >SWM341 系列 SFC 专用的驱动端口均为 GPIOD, 是连续的. </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00031">31</a> 行定义.</p>

</div>
</div>
<a id="a3badb246f5467fa88e29a1805028c949" name="a3badb246f5467fa88e29a1805028c949"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3badb246f5467fa88e29a1805028c949">&#9670;&#160;</a></span>SPI_CFREQ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_CFREQ&#160;&#160;&#160;(1000 * 1000 * 30)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI 时钟频率 / HZ (1 data-line : 1 HZ == 1 bps) 上限取决于系统运行主频, 当然软件模拟的 SPI 通讯速率也受到硬件 IO 翻转速度与代码运行消耗时长的影响 </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00036">36</a> 行定义.</p>

</div>
</div>
<a id="ad8e335b1f808bd7408d2aef2377adcb1" name="ad8e335b1f808bd7408d2aef2377adcb1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8e335b1f808bd7408d2aef2377adcb1">&#9670;&#160;</a></span>SPI_CPOL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_CPOL&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI 时钟极性 : 0 = SCK State Idle-Low, Active-High 1 = SCK State Idle-High, Active-Low </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00050">50</a> 行定义.</p>

</div>
</div>
<a id="a49e8927a636f45641d6231ac63b9e598" name="a49e8927a636f45641d6231ac63b9e598"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49e8927a636f45641d6231ac63b9e598">&#9670;&#160;</a></span>SPI_CPHA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_CPHA&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SPI 时钟相位 : 数据位采样相对于时钟线的时序 0 = 在时钟信号 SCK 的第 1 个跳变沿采样 1 = 在时钟信号 SCK 的第 2 个跳变沿采样 </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00056">56</a> 行定义.</p>

</div>
</div>
<a id="ac4460807041ec11a6df7a1e468fe6502" name="ac4460807041ec11a6df7a1e468fe6502"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4460807041ec11a6df7a1e468fe6502">&#9670;&#160;</a></span>SPI_GPIO_CS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_GPIO_CS&#160;&#160;&#160;GPIOD</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00062">62</a> 行定义.</p>

</div>
</div>
<a id="a32b432ca0c157114ad8724b4ccfd54eb" name="a32b432ca0c157114ad8724b4ccfd54eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32b432ca0c157114ad8724b4ccfd54eb">&#9670;&#160;</a></span>SPI_GPIO_SCLK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_GPIO_SCLK&#160;&#160;&#160;GPIOD</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00063">63</a> 行定义.</p>

</div>
</div>
<a id="a11ca1473a91ebd7bf66109cfdbecd09c" name="a11ca1473a91ebd7bf66109cfdbecd09c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11ca1473a91ebd7bf66109cfdbecd09c">&#9670;&#160;</a></span>SPI_GPIO_MOSI</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_GPIO_MOSI&#160;&#160;&#160;GPIOD</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00064">64</a> 行定义.</p>

</div>
</div>
<a id="a96c89cf4d15222d7f17682e86539412a" name="a96c89cf4d15222d7f17682e86539412a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96c89cf4d15222d7f17682e86539412a">&#9670;&#160;</a></span>SPI_GPIO_MISO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_GPIO_MISO&#160;&#160;&#160;GPIOD</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00065">65</a> 行定义.</p>

</div>
</div>
<a id="abfc84d8189ab922c0fb612466346c54f" name="abfc84d8189ab922c0fb612466346c54f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfc84d8189ab922c0fb612466346c54f">&#9670;&#160;</a></span>SPI_GPIO_DATA2</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_GPIO_DATA2&#160;&#160;&#160;GPIOD</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00066">66</a> 行定义.</p>

</div>
</div>
<a id="ab16748ae81bb0d5e74df6f6be62bfa4b" name="ab16748ae81bb0d5e74df6f6be62bfa4b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab16748ae81bb0d5e74df6f6be62bfa4b">&#9670;&#160;</a></span>SPI_GPIO_DATA3</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_GPIO_DATA3&#160;&#160;&#160;GPIOD</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00067">67</a> 行定义.</p>

</div>
</div>
<a id="a1ac3f651965edaa13ae45f8ce3388190" name="a1ac3f651965edaa13ae45f8ce3388190"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ac3f651965edaa13ae45f8ce3388190">&#9670;&#160;</a></span>SPI_PIN_CS</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_PIN_CS&#160;&#160;&#160;PIN6</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00069">69</a> 行定义.</p>

</div>
</div>
<a id="ad33a7f1c6464113d724bfb8512a7111a" name="ad33a7f1c6464113d724bfb8512a7111a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad33a7f1c6464113d724bfb8512a7111a">&#9670;&#160;</a></span>SPI_PIN_SCLK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_PIN_SCLK&#160;&#160;&#160;PIN5</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00070">70</a> 行定义.</p>

</div>
</div>
<a id="ae92d87a045a62c81ba03225f826d0d66" name="ae92d87a045a62c81ba03225f826d0d66"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae92d87a045a62c81ba03225f826d0d66">&#9670;&#160;</a></span>SPI_PIN_MOSI</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_PIN_MOSI&#160;&#160;&#160;PIN8</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00071">71</a> 行定义.</p>

</div>
</div>
<a id="a8c324b7fda3d7ab955ab2e1c14e9bba1" name="a8c324b7fda3d7ab955ab2e1c14e9bba1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c324b7fda3d7ab955ab2e1c14e9bba1">&#9670;&#160;</a></span>SPI_PIN_MISO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_PIN_MISO&#160;&#160;&#160;PIN7</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00072">72</a> 行定义.</p>

</div>
</div>
<a id="ae31c83f0ad20aa7ad6cec86418d365ab" name="ae31c83f0ad20aa7ad6cec86418d365ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae31c83f0ad20aa7ad6cec86418d365ab">&#9670;&#160;</a></span>SPI_PIN_DATA2</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_PIN_DATA2&#160;&#160;&#160;PIN3</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00073">73</a> 行定义.</p>

</div>
</div>
<a id="af370caa354a35a648239e4b92a17db85" name="af370caa354a35a648239e4b92a17db85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af370caa354a35a648239e4b92a17db85">&#9670;&#160;</a></span>SPI_PIN_DATA3</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPI_PIN_DATA3&#160;&#160;&#160;PIN4</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00074">74</a> 行定义.</p>

</div>
</div>
<a id="a48ba1c7927ff9208d9a478473553f849" name="a48ba1c7927ff9208d9a478473553f849"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48ba1c7927ff9208d9a478473553f849">&#9670;&#160;</a></span>SCLK_SET_IDLE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SCLK_SET_IDLE</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="dev__io_8h.html#a96b4afe19e3f086e8b63be4f58797a71">IO_SET_L</a>(<a class="el" href="dev__io__spi_8c.html#a32b432ca0c157114ad8724b4ccfd54eb">SPI_GPIO_SCLK</a>, <a class="el" href="dev__io__spi_8c.html#ad33a7f1c6464113d724bfb8512a7111a">SPI_PIN_SCLK</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00095">95</a> 行定义.</p>

</div>
</div>
<a id="a0769ce806ae0f2d344eb049dd659ddc1" name="a0769ce806ae0f2d344eb049dd659ddc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0769ce806ae0f2d344eb049dd659ddc1">&#9670;&#160;</a></span>SCLK_SET_BUSY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SCLK_SET_BUSY</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="dev__io_8h.html#a2b996c7f57f00197b2a21ec4e00265d0">IO_SET_H</a>(<a class="el" href="dev__io__spi_8c.html#a32b432ca0c157114ad8724b4ccfd54eb">SPI_GPIO_SCLK</a>, <a class="el" href="dev__io__spi_8c.html#ad33a7f1c6464113d724bfb8512a7111a">SPI_PIN_SCLK</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00096">96</a> 行定义.</p>

</div>
</div>
<a id="a2c4bb1c90ea96967cc17a94920be8215" name="a2c4bb1c90ea96967cc17a94920be8215"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c4bb1c90ea96967cc17a94920be8215">&#9670;&#160;</a></span>SET_QSPI_READ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SET_QSPI_READ</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">                                                <span class="keywordflow">do</span> {                                         \</div>
<div class="line">                                                IO_DIR_I(<a class="code hl_define" href="dev__io__spi_8c.html#a11ca1473a91ebd7bf66109cfdbecd09c">SPI_GPIO_MOSI</a>, <a class="code hl_define" href="dev__io__spi_8c.html#ae92d87a045a62c81ba03225f826d0d66">SPI_PIN_MOSI</a>);   \</div>
<div class="line">                                                IO_DIR_I(<a class="code hl_define" href="dev__io__spi_8c.html#a96c89cf4d15222d7f17682e86539412a">SPI_GPIO_MISO</a>, <a class="code hl_define" href="dev__io__spi_8c.html#a8c324b7fda3d7ab955ab2e1c14e9bba1">SPI_PIN_MISO</a>);   \</div>
<div class="line">                                                IO_DIR_I(<a class="code hl_define" href="dev__io__spi_8c.html#abfc84d8189ab922c0fb612466346c54f">SPI_GPIO_DATA2</a>, <a class="code hl_define" href="dev__io__spi_8c.html#ae31c83f0ad20aa7ad6cec86418d365ab">SPI_PIN_DATA2</a>); \</div>
<div class="line">                                                IO_DIR_I(<a class="code hl_define" href="dev__io__spi_8c.html#ab16748ae81bb0d5e74df6f6be62bfa4b">SPI_GPIO_DATA3</a>, <a class="code hl_define" href="dev__io__spi_8c.html#af370caa354a35a648239e4b92a17db85">SPI_PIN_DATA3</a>); \</div>
<div class="line">                                            } <span class="keywordflow">while</span>(0)</div>
<div class="ttc" id="adev__io__spi_8c_html_a11ca1473a91ebd7bf66109cfdbecd09c"><div class="ttname"><a href="dev__io__spi_8c.html#a11ca1473a91ebd7bf66109cfdbecd09c">SPI_GPIO_MOSI</a></div><div class="ttdeci">#define SPI_GPIO_MOSI</div><div class="ttdef"><b>Definition:</b> <a href="dev__io__spi_8c_source.html#l00064">dev_io_spi.c:64</a></div></div>
<div class="ttc" id="adev__io__spi_8c_html_a8c324b7fda3d7ab955ab2e1c14e9bba1"><div class="ttname"><a href="dev__io__spi_8c.html#a8c324b7fda3d7ab955ab2e1c14e9bba1">SPI_PIN_MISO</a></div><div class="ttdeci">#define SPI_PIN_MISO</div><div class="ttdef"><b>Definition:</b> <a href="dev__io__spi_8c_source.html#l00072">dev_io_spi.c:72</a></div></div>
<div class="ttc" id="adev__io__spi_8c_html_a96c89cf4d15222d7f17682e86539412a"><div class="ttname"><a href="dev__io__spi_8c.html#a96c89cf4d15222d7f17682e86539412a">SPI_GPIO_MISO</a></div><div class="ttdeci">#define SPI_GPIO_MISO</div><div class="ttdef"><b>Definition:</b> <a href="dev__io__spi_8c_source.html#l00065">dev_io_spi.c:65</a></div></div>
<div class="ttc" id="adev__io__spi_8c_html_ab16748ae81bb0d5e74df6f6be62bfa4b"><div class="ttname"><a href="dev__io__spi_8c.html#ab16748ae81bb0d5e74df6f6be62bfa4b">SPI_GPIO_DATA3</a></div><div class="ttdeci">#define SPI_GPIO_DATA3</div><div class="ttdef"><b>Definition:</b> <a href="dev__io__spi_8c_source.html#l00067">dev_io_spi.c:67</a></div></div>
<div class="ttc" id="adev__io__spi_8c_html_abfc84d8189ab922c0fb612466346c54f"><div class="ttname"><a href="dev__io__spi_8c.html#abfc84d8189ab922c0fb612466346c54f">SPI_GPIO_DATA2</a></div><div class="ttdeci">#define SPI_GPIO_DATA2</div><div class="ttdef"><b>Definition:</b> <a href="dev__io__spi_8c_source.html#l00066">dev_io_spi.c:66</a></div></div>
<div class="ttc" id="adev__io__spi_8c_html_ae31c83f0ad20aa7ad6cec86418d365ab"><div class="ttname"><a href="dev__io__spi_8c.html#ae31c83f0ad20aa7ad6cec86418d365ab">SPI_PIN_DATA2</a></div><div class="ttdeci">#define SPI_PIN_DATA2</div><div class="ttdef"><b>Definition:</b> <a href="dev__io__spi_8c_source.html#l00073">dev_io_spi.c:73</a></div></div>
<div class="ttc" id="adev__io__spi_8c_html_ae92d87a045a62c81ba03225f826d0d66"><div class="ttname"><a href="dev__io__spi_8c.html#ae92d87a045a62c81ba03225f826d0d66">SPI_PIN_MOSI</a></div><div class="ttdeci">#define SPI_PIN_MOSI</div><div class="ttdef"><b>Definition:</b> <a href="dev__io__spi_8c_source.html#l00071">dev_io_spi.c:71</a></div></div>
<div class="ttc" id="adev__io__spi_8c_html_af370caa354a35a648239e4b92a17db85"><div class="ttname"><a href="dev__io__spi_8c.html#af370caa354a35a648239e4b92a17db85">SPI_PIN_DATA3</a></div><div class="ttdeci">#define SPI_PIN_DATA3</div><div class="ttdef"><b>Definition:</b> <a href="dev__io__spi_8c_source.html#l00074">dev_io_spi.c:74</a></div></div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00104">104</a> 行定义.</p>

</div>
</div>
<a id="a327333db8ba4c488ba430739c8c4a03c" name="a327333db8ba4c488ba430739c8c4a03c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a327333db8ba4c488ba430739c8c4a03c">&#9670;&#160;</a></span>SET_QSPI_WRITE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SET_QSPI_WRITE</td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">                                                <span class="keywordflow">do</span> {                                         \</div>
<div class="line">                                                IO_DIR_O(<a class="code hl_define" href="dev__io__spi_8c.html#a11ca1473a91ebd7bf66109cfdbecd09c">SPI_GPIO_MOSI</a>, <a class="code hl_define" href="dev__io__spi_8c.html#ae92d87a045a62c81ba03225f826d0d66">SPI_PIN_MOSI</a>);   \</div>
<div class="line">                                                IO_DIR_O(<a class="code hl_define" href="dev__io__spi_8c.html#a96c89cf4d15222d7f17682e86539412a">SPI_GPIO_MISO</a>, <a class="code hl_define" href="dev__io__spi_8c.html#a8c324b7fda3d7ab955ab2e1c14e9bba1">SPI_PIN_MISO</a>);   \</div>
<div class="line">                                                IO_DIR_O(<a class="code hl_define" href="dev__io__spi_8c.html#abfc84d8189ab922c0fb612466346c54f">SPI_GPIO_DATA2</a>, <a class="code hl_define" href="dev__io__spi_8c.html#ae31c83f0ad20aa7ad6cec86418d365ab">SPI_PIN_DATA2</a>); \</div>
<div class="line">                                                IO_DIR_O(<a class="code hl_define" href="dev__io__spi_8c.html#ab16748ae81bb0d5e74df6f6be62bfa4b">SPI_GPIO_DATA3</a>, <a class="code hl_define" href="dev__io__spi_8c.html#af370caa354a35a648239e4b92a17db85">SPI_PIN_DATA3</a>); \</div>
<div class="line">                                            } <span class="keywordflow">while</span>(0)</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00111">111</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="a1ff4cee6a643c539fcad8e287445f95f" name="a1ff4cee6a643c539fcad8e287445f95f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ff4cee6a643c539fcad8e287445f95f">&#9670;&#160;</a></span>io_spi_delay()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void io_spi_delay </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>IO 模拟 SPI 通讯的时延 </p>
<dl class="section note"><dt>注解</dt><dd>因编译优化等级可能会调整, 延时须实际评估 </dd></dl>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00125">125</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8c_a1ff4cee6a643c539fcad8e287445f95f_icgraph.png" border="0" usemap="#adev__io__spi_8c_a1ff4cee6a643c539fcad8e287445f95f_icgraph" alt=""/></div>
<map name="adev__io__spi_8c_a1ff4cee6a643c539fcad8e287445f95f_icgraph" id="adev__io__spi_8c_a1ff4cee6a643c539fcad8e287445f95f_icgraph">
<area shape="rect" title="IO 模拟 SPI 通讯的时延" alt="" coords="168,55,263,80"/>
<area shape="rect" href="dev__io__spi_8c.html#a4b9736b990d7b5ce371509d7edd35a70" title="IO 模拟 QSPI 通讯读" alt="" coords="15,5,110,31"/>
<area shape="rect" href="dev__io__spi_8c.html#acbe161ab6562f9da568695c02f71d18e" title="IO 模拟 QSPI 通讯写" alt="" coords="14,55,111,80"/>
<area shape="rect" href="dev__io__spi_8c.html#adb59768338d754f15de5d09e175fb3b8" title="IO 模拟标准 SPI 通讯读写" alt="" coords="5,104,120,129"/>
</map>
</div>

</div>
</div>
<a id="a16d2dfe6a5c03f49b9584239472f5c41" name="a16d2dfe6a5c03f49b9584239472f5c41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16d2dfe6a5c03f49b9584239472f5c41">&#9670;&#160;</a></span>IO_SPI_CS_LOW()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void IO_SPI_CS_LOW </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>IO 模拟 SPI 通讯的 CS 拉低 </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00136">136</a> 行定义.</p>

</div>
</div>
<a id="a97e76f9e7d5b3673003b3062b0982abb" name="a97e76f9e7d5b3673003b3062b0982abb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97e76f9e7d5b3673003b3062b0982abb">&#9670;&#160;</a></span>IO_SPI_CS_HIGH()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void IO_SPI_CS_HIGH </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>IO 模拟 SPI 通讯的 CS 拉高 </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00144">144</a> 行定义.</p>

</div>
</div>
<a id="ae5dc9bbf8a794391f1183411c047dfa2" name="ae5dc9bbf8a794391f1183411c047dfa2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5dc9bbf8a794391f1183411c047dfa2">&#9670;&#160;</a></span>io_spi_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void io_spi_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 模拟 SPI 通讯端口初始化 </p>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00152">152</a> 行定义.</p>

</div>
</div>
<a id="adb59768338d754f15de5d09e175fb3b8" name="adb59768338d754f15de5d09e175fb3b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb59768338d754f15de5d09e175fb3b8">&#9670;&#160;</a></span>io_spi_readwrite()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t io_spi_readwrite </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bit_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 模拟标准 SPI 通讯读写 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>: 待发送数据 </td></tr>
    <tr><td class="paramname">bit_len</td><td>: 数据长度(/bit)&lt;不超过 32 bit&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">uint32_t</td><td>: 返回发送过程中接收到的数据 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00178">178</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8c_adb59768338d754f15de5d09e175fb3b8_cgraph.png" border="0" usemap="#adev__io__spi_8c_adb59768338d754f15de5d09e175fb3b8_cgraph" alt=""/></div>
<map name="adev__io__spi_8c_adb59768338d754f15de5d09e175fb3b8_cgraph" id="adev__io__spi_8c_adb59768338d754f15de5d09e175fb3b8_cgraph">
<area shape="rect" title="IO 模拟标准 SPI 通讯读写" alt="" coords="5,5,120,31"/>
<area shape="rect" href="dev__io__spi_8c.html#a1ff4cee6a643c539fcad8e287445f95f" title="IO 模拟 SPI 通讯的时延" alt="" coords="168,5,263,31"/>
</map>
</div>

</div>
</div>
<a id="acbe161ab6562f9da568695c02f71d18e" name="acbe161ab6562f9da568695c02f71d18e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbe161ab6562f9da568695c02f71d18e">&#9670;&#160;</a></span>io_qspi_write()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void io_qspi_write </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bit_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 模拟 QSPI 通讯写 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>: 待发送数据 </td></tr>
    <tr><td class="paramname">bit_len</td><td>: 数据长度(/bit)&lt;必须被 4 整除, 不超过 32 bit&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">/</td><td></td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00228">228</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8c_acbe161ab6562f9da568695c02f71d18e_cgraph.png" border="0" usemap="#adev__io__spi_8c_acbe161ab6562f9da568695c02f71d18e_cgraph" alt=""/></div>
<map name="adev__io__spi_8c_acbe161ab6562f9da568695c02f71d18e_cgraph" id="adev__io__spi_8c_acbe161ab6562f9da568695c02f71d18e_cgraph">
<area shape="rect" title="IO 模拟 QSPI 通讯写" alt="" coords="5,5,103,31"/>
<area shape="rect" href="dev__io__spi_8c.html#a1ff4cee6a643c539fcad8e287445f95f" title="IO 模拟 SPI 通讯的时延" alt="" coords="151,5,245,31"/>
</map>
</div>

</div>
</div>
<a id="a4b9736b990d7b5ce371509d7edd35a70" name="a4b9736b990d7b5ce371509d7edd35a70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b9736b990d7b5ce371509d7edd35a70">&#9670;&#160;</a></span>io_qspi_read()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t io_qspi_read </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bit_len</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 模拟 QSPI 通讯读 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">bit_len</td><td>: 数据长度(/bit)&lt;必须被 4 整除, 不超过 32 bit&gt; </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">uint32_t</td><td>: 返回接收到的数据 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="dev__io__spi_8c_source.html">dev_io_spi.c</a> 第 <a class="el" href="dev__io__spi_8c_source.html#l00285">285</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io__spi_8c_a4b9736b990d7b5ce371509d7edd35a70_cgraph.png" border="0" usemap="#adev__io__spi_8c_a4b9736b990d7b5ce371509d7edd35a70_cgraph" alt=""/></div>
<map name="adev__io__spi_8c_a4b9736b990d7b5ce371509d7edd35a70_cgraph" id="adev__io__spi_8c_a4b9736b990d7b5ce371509d7edd35a70_cgraph">
<area shape="rect" title="IO 模拟 QSPI 通讯读" alt="" coords="5,5,100,31"/>
<area shape="rect" href="dev__io__spi_8c.html#a1ff4cee6a643c539fcad8e287445f95f" title="IO 模拟 SPI 通讯的时延" alt="" coords="148,5,243,31"/>
</map>
</div>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
